from src.config import Config
from src.logger import Logger
from src.mq import MessageQueue


def mimo_plot_example():
    config = Config()
    mq = MessageQueue(config.rabbit_mq.host, config.rabbit_mq.port)
    body = """{
        "id": 1,
        "args": {
            "counts": 1000,
            "receiveAntennas": 2,
            "modulationMode": 1,
            "noiseRate": 1
        }
    }"""
    Logger.Debug(f"plot: {body}")

    mq.channel.queue_declare(queue=config.lab_mimo_plot.queue, durable=True)
    mq.channel.basic_publish(
        routing_key=config.lab_mimo_plot.queue,
        exchange="",
        body=body.encode(),
    )


if __name__ == "__main__":
    mimo_plot_example()
